<?php
namespace app\api\model;
use think\Model;
class Image extends Model{
    protected $hidden = ['delete_time','update_time','id','from'];
    public function getUrlAttr($value,$data)
    {
        $findUrl = $value;
        if($data['from']== 1){
            $findUrl = config('setting.img_prefix').$value;
        }
            return $findUrl;
    }

}